#ifndef TASK_H
#define TASK_H

#define MAX_TASKS   32

struct task
{
    uint32_t * stack;
    uint32_t id;
    char name[32];
} task[MAX_TASKS];

volatile uint32_t active_task_id, current_id;
uint32_t active_task_count;

uint32_t active_task_esp;

bool multitasking_enabled;

extern void GUTS(void);

void setup_multitasking(void);
void sched(void);
void add_task(const uint32_t entry, const char * name);
void kill_task(const uint32_t id);

#endif

